import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';

const routes: RouteRecordRaw[] = [
  {
    path: 'platformManagement',
    name: 'platformManagement',
    component: RouterView,
    meta: {
      title: '平台管理',
      icon: 'icon-pingtaiguanli',
    },
    children: [
      {
        path: 'approval_configuration',
        name: 'approval_configuration',
        component: () => import(/* webpackChunkName: "env_abnormal" */ '../pages/approval_configuration/index.vue'),
        meta: {
          title: '业务审批配置',
          keepAlive: false,
        },
      },
      {
        path: 'approval_management',
        name: 'approval_management',
        component: () => import(/* webpackChunkName: "env_abnormal" */ '../pages/approval_management/index.vue'),
        meta: {
          title: '审批流程管理',
          keepAlive: false,
        },
      },
      {
        path: 'sampleProcessList',
        name: 'sampleProcessList',
        component: () => import(/* webpackChunkName: "env_abnormal" */ '../pages/sampleProcessList/index.vue'),
        meta: {
          title: '流程配置',
          keepAlive: false,
        },
      },
      {
        path: 'userManagement',
        name: 'userManagement',
        component: () => import('../pages/user-management/user-management.vue'),
        meta: {
          title: '用户管理',
        },
      },
      {
        name: 'roleManagement',
        path: 'roleManagement',
        component: () => import('../pages/role-management/role-management.vue'),
        meta: {
          title: '角色管理',
        },
      },
      {
        path: 'projectManagement',
        name: 'projectManagement',
        component: () => import('../pages/project-management/project-management.vue'),
        meta: {
          title: {
            // @ts-ignore
            'zh-CN': '课题管理',
            'zh-CN-cas': '项目管理',
            'zh-CN-tianjin': '课题管理',
          },
        },
      },
      {
        name: 'clientUpgradeManagement',
        path: 'clientUpgradeManagement',
        component: () => import('../pages/client-upgrade-management/client-upgrade-management.vue'),
        meta: {
          title: '客户端升级管理',
        },
      },
      {
        name: 'backupRestore',
        path: 'backupRestore',
        component: () => import('../pages/backup-restore/backup-restore.vue'),
        meta: {
          title: '备份还原',
        },
      },
      {
        name: 'systemSettings',
        path: 'systemSettings',
        component: () => import('../pages/system-settings/system-settings.vue'),
        meta: {
          title: '系统设置',
        },
      },
    ],
  },
];

export default routes;
